package com.kfm.src.Demo0925;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

public class demo {
    public static void main(String[] args) throws IOException {
        File file = new File("testfile/a.txt");
        InputStream resourceAsStream = Dog.class.getClassLoader().getResourceAsStream(String.valueOf(file));
        String s = new String(resourceAsStream.readAllBytes());
        System.out.println(s);
        resourceAsStream.close();
    }
}
